<template>
  <!-- <div class="m-4"><span>2、需用材料</span></div> -->
  <!-- <el-input style="width: 120px;" v-model="formInline.name" readonly /> -->
  <el-form :model="dangerForm" label-position="left" class="demo-form-inline m-l-10">
    <el-form-item label="危险源" label-width="80px">
      <el-input v-model="dangerForm.danger"></el-input>
    </el-form-item>
    <el-form-item label="动火等级" label-width="80px">
      <el-input v-model="dangerForm.file"></el-input>
    </el-form-item>
  </el-form>
  <!-- <el-form  :model="formInline" label-position="left" class="demo-form-inline m-l-10">
    <el-form-item label="危险源" label-width="80px">
      <el-select v-model="formInline.name" :disabled="!isEdit" multiple placeholder="请选择危险源(多选)">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
      </el-select>
    </el-form-item>
    <el-form-item label="动火等级" label-width="80px">
      <el-select v-model="formInline.level" :disabled="!isEdit"  placeholder="请选择动火等级">
        <el-option v-for="item in levelOptions" :key="item.value" :label="item.label" :value="item.value" />
      </el-select>
    </el-form-item>
    <el-form-item label="消防器材" label-width="80px">
      <el-select v-model="formInline.machines" :disabled="!isEdit" multiple  placeholder="请选择消防器材(多选)">
        <el-option v-for="item in fileOptions" :key="item.value" :label="item.label" :value="item.value" />
      </el-select>    
    </el-form-item>
  </el-form> -->
</template>

<script setup lang="ts">
import { ref } from "vue"
const dangerForm = ref({
  danger: '',
  file: ''
})
interface optionForm {
  name: string[],
  level: string,
  machines: string[],
}
const levelOptions = [{
  label: "一级动火", value: "1"
}, {
  label: "二级动火", value: "2"
}, {
  label: "三级动火", value: "3"
}, {
  label: "四级动火", value: "4"
}
]
const fileOptions = [{
  label: "干粉灭火器", value: "1"
}, {
  label: "消防车", value: "2"
}
]
const options = [
  {
    label: "高处作业",
    value: "1"
  }, {
    label: "动火作业",
    value: "2"
  }, {
    label: "起重作业",
    value: "3"
  }, {
    label: "机械伤害",
    value: "4"
  },
  {
    label: "用电作业",
    value: "5"
  }, {
    label: "物体打击",
    value: "6"
  }, {
    label: "电气安全",
    value: "7"
  }]
const formInline = ref<optionForm>({
  name: ['1', '2', '3', '4', '5', '6'],
  level: '3',
  machines: ['1']
})
defineProps({
  isEdit: Boolean,
  formData: Object
})

</script>

<style lang="less" scoped>
.container {}
</style>
